﻿using SQLinq;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleDatabaseAdapter
{
    internal static class AllDataExtensions
    {
        internal static SqlParameter[] GetSQLParametrs(this SQLinqResult result)
        {
            List<SqlParameter> parametrs = new List<SqlParameter>();

            foreach (var el in result.Parameters)
            {
                parametrs.Add(new SqlParameter(el.Key, el.Value));
            }

            return parametrs.ToArray();
        }
    }
}
